package com.joey.protocol;

public class JSONFormat {

    protected String statusKey;
    protected String resultKey;
    protected String msgKey;

    static String successKey = "1";

    public JSONFormat(){
        this.statusKey = "resultCode";
        this.resultKey = "result";
        this.msgKey = "resultMessage";
    }

    /**
     * @param statusKey
     * @param resultKey
     * @param messageKey
     */
    public JSONFormat(String statusKey, String resultKey, String messageKey){
        this.statusKey = statusKey;
        this.resultKey = resultKey;
        this.msgKey = messageKey;
    }

    public JSONFormat format(String statusKey, String resultKey, String messageKey) {
        this.statusKey = statusKey;
        this.resultKey = resultKey;
        this.msgKey = messageKey;
        return this;
    }

    public JSONFormat initSuccessKey(String key) {
        successKey = key;
        return this;
    }

}